
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hook_up_rent/routes/index.dart';

class PageContent extends StatelessWidget {
  final String name;

  const PageContent({Key key, this.name}) : super(key: key);


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(name),
        centerTitle: true,
      ),
      body: Row(children: [
        ElevatedButton(onPressed: (){
          Navigator.pushNamed(context, MyRoutes.login);
        }, child: Text(MyRoutes.login)),
        ElevatedButton(onPressed: (){
          Navigator.pushNamed(context, MyRoutes.home);
        }, child: Text(MyRoutes.home)),
        ElevatedButton(onPressed: (){
          Navigator.pushNamed(context, "/room/101");
        }, child: Text("查看房间详情")),
        ElevatedButton(onPressed: (){
          Navigator.pushNamed(context, "/404");
        }, child: Text("/404"))
      ],),
    );
  }
}
